<template>
	<view class="container-withdrawal">
		<!-- <image src="@/static/imgbgc.png" mode="" style="width: 100%;height: 100%;"></image> -->
		<scroll-view scroll-y="true" class="wallet-main">
			<view class="wallet-list" v-if="marthlist.length>0" v-for="(item,index) in marthlist" :key="item.id">
				<view class="top">
					<view class="title">充值</view>
					<view class="num">{{item.status==0?'待审核':item.status==1?'已完成':'已拒绝'}}</view>
				</view>
				<view class="bottom">
					<view class="mintitle">充值金额</view>
					<view class="data">{{item.money}}</view>
				</view>
				<!-- <view class="bottom">
					<view class="mintitle">手续费</view>
					<view class="data">{{item.sxf}}</view>
				</view> -->
				<!-- <view class="bottom">
					<view class="mintitle">实际到账</view>
					<view class="data">{{item.point}}</view>
				</view> -->
				<view class="bottom" v-if="item.status==2&&item.refuse_text">
					<view class="mintitle">拒绝原因</view>
					<view class="data">{{item.refuse_text}}</view>
				</view>
				<view class="bottom">
					<view class="mintitle">充值时间</view>
					<view class="data">{{$fun.formatTime(item.createtime*1000) }}</view>
				</view>
			</view>
		</scroll-view>
		<noneDate v-if="marthlist.length==0" :type="0"></noneDate>
	</view>
</template>

<script>
	import noneDate from '@/components/noneDate/noneDate.vue'
	export default {
		data() {
			return {
				marthlist: [],
				id: '',
				page: 1
			};
		},
		components: {
			noneDate
		},
		onLoad(options) {
			uni.setNavigationBarTitle({
				title: options.name
			})
			this.id = options.id
			this.getList()
		},
		onReachBottom() {
			this.getList()
		},
		methods: {
			getList() {
				this.$fun.ajax.post('user/rechargeList', {
					id: this.id,
					page: this.page,
					limit: 10
				}).then(res => {
					if (res.code == 1 && res.data.length > 0) {
						this.marthlist.push(...res.data)
						this.page++
					} else {
						if (this.page != 1) {
							this.$fun.msg('没有更多数据了...')
						}
					}
				})
			}
		}
	}
</script>

<style lang="scss">
	page {
		height: 100%;
	}

	.container-withdrawal {
		height: 100%;
		position: relative;

		.wallet-main {
			position: absolute;
			top: 0rpx;
			left: 50%;
			transform: translate(-50%);
			height: 100%;
			width: 100%;
			background-color: #f9f9f9;
			padding: 10rpx 30rpx 30rpx;
			border-radius: 20rpx;
		}
	}

	.wallet-list {
		width: 100%;
		margin: 20rpx 0;
		background: #fff;
		border-radius: 10upx;
		padding: 40upx 20upx 40upx 23upx;
		box-sizing: border-box;
	}

	.wallet-list .top {
		display: flex;
		justify-content: space-between;
	}

	.wallet-list .top .title {
		color: #323232;
		font-size: 30upx;
	}

	.wallet-list .top .num {
		color: #db1121;
		font-size: 36upx;
	}

	.wallet-list .bottom {
		display: flex;
		justify-content: space-between;
		margin-top: 20upx;
		font-size: 24upx;
	}

	.wallet-list .bottom .mintitle {
		color: #808080;
	}

	.wallet-list .bottom .data {
		color: #808080;
	}
</style>